package com.superatom.gc;

import java.util.ArrayList;
import java.util.List;

public class HeapOOM {

    static class OOMObject{

    }

    public static void main(String[] agrs){
        List<OOMObject> list = new ArrayList<OOMObject>();

        while (true){
            list.add(new OOMObject());

            if (list.size() == 5){
                list.clear();
            }
        }
    }
}
